package br.edu.infnet.modelo;


import java.io.Serializable;

public class AvaliacaoPK implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3099410404840559930L;

	private Integer idLogin;
	private Integer idModulo;
	
	public AvaliacaoPK() {
	}

	public AvaliacaoPK(Integer idLogin, Integer idModulo) {
		this.idLogin = idLogin;
		this.idModulo = idModulo;
	}

	public AvaliacaoPK(int idModulo) {
		this.idModulo = idModulo;
	}

	
	public AvaliacaoPK(Integer idLogin) {
		this.idLogin = idLogin;
	}



	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((idLogin == null) ? 0 : idLogin.hashCode());
		result = prime * result
				+ ((idModulo == null) ? 0 : idModulo.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		AvaliacaoPK other = (AvaliacaoPK) obj;
		if (idLogin == null) {
			if (other.idLogin != null)
				return false;
		} else if (!idLogin.equals(other.idLogin))
			return false;
		if (idModulo == null) {
			if (other.idModulo != null)
				return false;
		} else if (!idModulo.equals(other.idModulo))
			return false;
		return true;
	}
	
	
	
}
